<!DOCTYPE HTML>
<html>
<head>
<meta charset="utf-8">
<meta name="renderer" content="webkit|ie-comp|ie-stand">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no" />
<meta http-equiv="Cache-Control" content="no-siteapp" />
<!--[if lt IE 9]>
<script type="text/javascript" src="lib/html5.js"></script>
<script type="text/javascript" src="lib/respond.min.js"></script>
<script type="text/javascript" src="lib/PIE_IE678.js"></script>
<![endif]-->
<link href="css/H-ui.min.css" rel="stylesheet" type="text/css" />
<link href="css/H-ui.admin.css" rel="stylesheet" type="text/css" />
<link href="lib/Hui-iconfont/1.0.7/iconfont.css" rel="stylesheet" type="text/css" />
<link href="css/style.css" rel="stylesheet" type="text/css" />
<!--[if IE 6]>
<script type="text/javascript" src="lib/DD_belatedPNG_0.0.8a-min.js" ></script>
<script>DD_belatedPNG.fix('*');</script>
<![endif]-->
<title>用户管理</title>
</head>
<body>
<nav class="breadcrumb">
	<i class="Hui-iconfont">&#xe67f;</i> <a _href="welcome.html" class="fun-toindex" href="javascript:;">首页</a> 
	<span class="c-gray en">&gt;</span> <a href="/Manage/member-list.html">用户中心</a> 
	<span class="c-gray en">&gt;</span> 用户管理 
	<a class="btn btn-success radius r mr-20 reload" style="line-height:1.6em;margin-top:3px" href="javascript:;" title="刷新" ><i class="Hui-iconfont">&#xe68f;</i></a>
	
	<span class="r" style="margin-top: -2px; box-sizing: border-box;">
		<select name="flag" id="flag" class="select" style="width: auto; height: 31px; vertical-align: middle;">
			<option value="" selected="">状态</option>
			<option value="0">关闭</option>
			<option value="1">显示</option>
		</select>

		<!-- <select name="is_distributor" id="is_distributor" class="select" style="width: auto; height: 31px; vertical-align: middle;">
			<option value="" selected="">是否分销会员</option>
			<option value="0">否</option>
			<option value="1">是</option>
		</select> -->
		<!-- <span style="position:relative">
			<input type="text" class="input-text" style="width:100px" placeholder="会员名称" id="" name="username">
			<i class="Hui-iconfont i-close" id="inputclear">&#xe706;</i>
		</span>
		<span style="position:relative">
			<input type="text" class="input-text" style="width:150px" placeholder="电话" id="" name="phone">
			<i class="Hui-iconfont i-close" id="inputclear">&#xe706;</i>
		</span>
		<span style="position:relative">
			<input type="text" class="input-text" style="width:150px" placeholder="授权码" id="" name="code">
			<i class="Hui-iconfont i-close" id="inputclear">&#xe706;</i>
		</span> -->
		<div style="display:inline-block; width:380px; position:relative;">
			日期范围：
			<input name="time" type="text" id="date-range1" class="input-text datainp" style="width:300px">
			<i class="Hui-iconfont i-close" id="inputclear">&#xe706;</i>
		</div>
		<!-- <select name="sort" id="sort" class="select" style="width: auto; height: 31px; vertical-align: middle;">
			<option value="" selected="">排序方式</option>
			<option value="new">注册时间</option>
			<option value="lastLogin">最后登录时间</option>
		</select> -->
		<span style="position:relative">
			<input type="text" name="k"  placeholder="会员编号/名称/电话" style="width:300px" class="input-text">
			<i class="Hui-iconfont i-close" id="inputclear">&#xe706;</i>
		</span>
		<button name="" id="search" class="btn btn-success"><i class="Hui-iconfont">&#xe665;</i> 搜索</button>
	</span>
</nav>
<div class="pd-20">
	<div >
	<table class="table table-border table-bordered table-hover table-bg table-sort">
		<thead>
			<tr class="text-c sort0">
				<th width="25" class="valueid"><input type="checkbox" name="" value=""></th>
				<th width="80" class="fun-sort2" data-name="uid" data-flag="0">UID</th>
				<th width="100">用户名0</th>
				<th width="70">用户头像</th>
				<th width="90">手机</th>
				<!-- <th>授权码</th> -->
				<th width="100" class="fun-sort2" data-name="user_addtime" data-flag="0">加入时间</th>
				<th width="100" class="fun-sort2" data-name="user_old_login_time" data-flag="0">上次登陆时间</th>
				<th width="60">状态</th>
				<th width="50">操作</th>
			</tr>
		</thead>
		<tbody id="content_sp">
			
		</tbody>
	</table>
	</div>
	<div class="cl bg-1 bk-gray mt-20">
		<a href="javascript:;" class="btn btn-warning l mr-10 mt-5 radius fun-all" data-type="stop"><i class="Hui-iconfont">&#xe6de;</i> 批量关闭</a> 
		<a href="javascript:;" class="btn btn-success l mr-10 mt-5 radius fun-all" data-type="start"><i class="Hui-iconfont">&#xe603;</i> 批量开启</a> 
		<a href="javascript:;" class="btn btn-danger l mr-10 mt-5 radius fun-all" data-type="del"><i class="Hui-iconfont">&#xe6e2;</i> 批量删除</a> 
		
		<span class="r pt-5" id="page" style="line-height: 35px;"></span> 
		<span class="r mr-10" id="dataall" style="line-height: 40px;"></span> 

	</div>
</div>
<script id="test" type="text/html">
	<% for (x in list) { %>
	<tr class="text-c sort1">
		<td class="valueid"><input type="checkbox" value="<%=list[x].uid%>" name=""></td>
		<td><%=list[x].uid%></td>
		<td><%=list[x].user_name%></td>
		<td>
			<img class="pic-thumb" src="/Manage/images/blank.gif" data-lazy="<%=list[x].user_avatar%>">
		</td>
		<td><%=list[x].user_mobile%></td>
		<!-- <td><%=list[x].user_code%></td> -->
		<td><%=list[x].user_addtime%></td>
		<td><%=list[x].user_old_login_time%></td>
		<td class="td-status">
			<input type="checkbox" class="switch fun-start-stop" style="outline: none;" <%if(list[x].user_state==1){ %>checked<% } %>/>
		</td>
		<td class="td-manage f-18">
			<a style="text-decoration:none" onClick="_open('用户编辑','member-add.html?id=<%=list[x].uid%>','90%','80%',true)" class="ml-5 edit" href="javascript:;" title="编辑"><i class="Hui-iconfont">&#xe6df;</i></a> 
			<!-- <a style="text-decoration:none" class="ml-5 fun-del" href="javascript:;" title="删除"><i class="Hui-iconfont">&#xe6e2;</i></a> -->
			<!-- <a style="text-decoration:none" onClick="_open('查看详情','member-detail.html?mid=<%=list[x].uid%>','90%','90%',false)" href="javascript:;" title="查看详情"><i class="Hui-iconfont">&#xe695;</i></a>  -->
		</td>
	</tr>
	<%}%>  
</script>
<script type="text/javascript" src="lib/jquery/1.9.1/jquery.min.js"></script> 
<script type="text/javascript" src="lib/layer/2.1/layer.js"></script>
<script type="text/javascript" src="js/H-ui.js"></script> 
<script type="text/javascript" src="js/H-ui.admin.js"></script> 
<script type="text/javascript" src="js/template-native.js"></script> 
<script type="text/javascript" src="js/s.js"></script> 
<script type="text/javascript" src="lib/laypage/laypage.js"></script>
<script type="text/javascript" src="lib/daterangepicker/moment.min.js"></script> 
<script type="text/javascript" src="lib/daterangepicker/jquery.daterangepicker.js"></script>
<link rel="stylesheet" href="lib/daterangepicker/daterangepicker.css" /> 
<script src="/Manage/js/lazyload.min.js"></script> 
<script type="text/javascript">
var API=API_USER;
var kk=API_USER;
var orderby='';
var search='';

loaddata(API,1);


$('#date-range1').dateRangePicker({
	startOfWeek: 'monday',
	separator : ' 至 ',
	format: 'YYYY-MM-DD HH:mm',
	autoClose: true,
	time: {
		enabled: true
	},
	defaultTime: moment().startOf('day').toDate(),
	defaultEndTime: moment().endOf('day').toDate()
});

$(function(){
    $("#search").click(function(){
    	kk=API+"?";

    	var param=[
    		// 'username='+encodeURI(document.querySelector('input[name=username]').value),
    		
    		't='+document.querySelector('select[name=flag]').value,
    		// 'is_distributor='+document.querySelector('select[name=is_distributor]').value,

    		'time='+document.querySelector('input[name=time]').value,
    		// 'phone='+document.querySelector('input[name=phone]').value,
    		// 'code='+document.querySelector('input[name=code]').value,

    		'k='+document.querySelector('input[name=k]').value,

    	];
    	search=param.join('&');
    kk=kk+search+'&'+orderby;
	loaddata(kk,1);

    	
    })

});

</script> 
</body>
</html>